<template>
    <div class="col-xs-offset-2 col-xs-8">
        <div class="page-header">
            <h2>Vue Router Demo 路由导航案例</h2>
            <button @click="back">后退</button>
            <button @click="forward">前进</button>
            <button @click="test">测试一下go</button>
        </div>
    </div>
</template>

<script>
    export default {
        name: 'Banner',
        methods: {
            back() {
                // 后退
                this.$router.back();
            },
            forward() {
                // 前进
                this.$router.forward();
            },
            test() {
                // 正数就是前进几步，负数就是后退几步
                this.$router.go(3);
            }
        },
    }
</script>

<style lang="css">

</style>